package com.bestcem.xm.txtanls.grpc.service.param.survey;

import com.bestcem.xm.common.core.constant.RegTypes;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.util.List;

/**
 * 更新问卷分析项目分析选项入参校验
 *
 * @author XiaoYunSong <ys.xiao@idiaoyan.com>
 * @version v1.0
 * @date 2021/5/10-15:21
 */
@AllArgsConstructor
@NoArgsConstructor
@Getter
@Setter
public class UpdateOpenOptionParam {
    /**
     * 项目id
     */
    @NotBlank(message = "项目id错误")
    @Pattern(regexp = RegTypes.OBJECT_ID, message = "项目id错误")
    private String projectId;


    /**
     * 训练字段列表
     */
    @Valid
    @NotEmpty(message = "训练字段列表不能为空")
    private List<SurveyFieldParam> textFields;
}
